package pony.struts.formbeans;

import org.apache.struts.action.ActionForm;

public class HelloActionForm extends ActionForm {
	private String name;
	private double height;
	private double weight;
	private String telNum;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTelNum() {
		return telNum;
	}

	public void setTelNum(String telNum) {
		this.telNum = telNum;
	}

	public double getHeight() {
		return height;
	}

	public void setHeight(double height) {
		if(height < 0)
			throw new IllegalArgumentException("身高輸入錯誤!");
		this.height = height;
	}

	public double getWeight() {
		return weight;
	}

	public void setWeight(double weight) {
		if(weight < 0)
			throw new IllegalArgumentException("體重輸入錯誤!");
		this.weight = weight;
	}
	
}
